@{
    Layout=null;
}
@using MvcDemo.Models;
@model IEnumerable<Product>;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <input type="text" placeholder="请输入关键字" name="keyword">
        <input type="button" value="查询" id="btnQuery" >
        <input type="button" value="新增" id="add">
        <div id="tbData">
            <table><tr>
                <td>id</td>
                <td>商品名称</td>
                <td>供应商名称</td>
                <td>价格</td>
                <td>库存数量</td>
                <td>备注</td>
                <td>操作</td>
            </tr>
            @foreach (var item in Model)
            {
                <tr class="tbRow">
                <td>@item.id</td>
                <td>@item.ProductName</td>
                <td>@item.Supplier</td>
                <td>@item.Price</td>
                <td>@item.Stock</td>
                <td>@item.Remarks</td>
                <td>
                    <input type="button" value="编辑" class="btnEdit" onclick="btnEdit(@item.id)">
                    <input type="button" value="删除" class="btnDel" onclick="btnDel(@item.id)">
                </td>
            </tr>
            }
            </table>
            
        </div>
    </div>
    <script src="~/js/jquery.min.js"></script>
    <script src="~/js/base.js"></script>
</body>
</html>